bitkeeper revision 1.1203.1.2 (42150898CXjY7WEQQX0UPd8XVrticw)
authormaf46@burn.cl.cam.ac.uk <maf46@burn.cl.cam.ac.uk>
Thu, 17 Feb 2005 21:11:52 +0000 (21:11 +0000)
committermaf46@burn.cl.cam.ac.uk <maf46@burn.cl.cam.ac.uk>
Thu, 17 Feb 2005 21:11:52 +0000 (21:11 +0000)
Minor cleanup of vmx debug messages

xen/arch/x86/mm.c
xen/arch/x86/vmx.c
xen/arch/x86/vmx_intercept.c
xen/arch/x86/vmx_io.c
xen/arch/x86/vmx_vmcs.c

index b0f4951d6c59a864e44b5cea2ea8317ea0bb96ee..25099101173f984a4ddc5b29dad3a8092d860a61 100644 (file)
@@ -2974,4 +2974,4 @@ void audit_domains_key(unsigned char key)
     audit_domains();
 }
 
-#endif
+#endif /* NDEBUG */
index 6b17946c7b8790a045305798c31c457fb75aa9a1..033dc76a860da4c301d35d7b2e11cdbaf3ce9d86 100644 (file)
@@ -42,7 +42,7 @@
 #ifdef CONFIG_VMX
 
 int vmcs_size;
-unsigned int opt_vmx_debug_level;
+unsigned int opt_vmx_debug_level = 0;
 
 extern long evtchn_send(int lport);
 extern long do_block(void);
@@ -120,7 +120,7 @@ static int vmx_do_page_fault(unsigned long va, unsigned long error_code)
     {
         __vmread(GUEST_EIP, &eip);
         VMX_DBG_LOG(DBG_LEVEL_VMMU, 
-                "vmx_do_page_fault = 0x%lx, eip = %lx, erro_code = %lx\n", 
+                "vmx_do_page_fault = 0x%lx, eip = %lx, erro_code = %lx",
                 va, eip, error_code);
     }
 #endif
@@ -157,11 +157,11 @@ static void vmx_do_general_protection_fault(struct xen_regs *regs)
     __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
 
     VMX_DBG_LOG(DBG_LEVEL_1,
-            "vmx_general_protection_fault: eip = %lx, erro_code = %lx\n",
+            "vmx_general_protection_fault: eip = %lx, erro_code = %lx",
             eip, error_code);
 
     VMX_DBG_LOG(DBG_LEVEL_1,
-            "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx\n",
+            "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
             regs->eax, regs->ebx, regs->ecx, regs->edx, regs->esi, regs->edi);
 
     /* Reflect it back into the guest */
@@ -182,7 +182,7 @@ static void vmx_vmexit_do_cpuid(unsigned long input, struct xen_regs *regs)
 
     VMX_DBG_LOG(DBG_LEVEL_1, 
                 "do_cpuid: (eax) %lx, (ebx) %lx, (ecx) %lx, (edx) %lx,"
-                " (esi) %lx, (edi) %lx\n",
+                " (esi) %lx, (edi) %lx",
                 regs->eax, regs->ebx, regs->ecx, regs->edx,
                 regs->esi, regs->edi);
 
@@ -200,7 +200,7 @@ static void vmx_vmexit_do_cpuid(unsigned long input, struct xen_regs *regs)
     regs->edx = (unsigned long) edx;
 
     VMX_DBG_LOG(DBG_LEVEL_1, 
-            "vmx_vmexit_do_cpuid: eip: %lx, input: %lx, out:eax=%x, ebx=%x, ecx=%x, edx=%x\n", 
+            "vmx_vmexit_do_cpuid: eip: %lx, input: %lx, out:eax=%x, ebx=%x, ecx=%x, edx=%x",
             eip, input, eax, ebx, ecx, edx);
 
 }
@@ -220,7 +220,7 @@ static void vmx_dr_access (unsigned long exit_qualification, struct xen_regs *re
     reg = exit_qualification & DEBUG_REG_ACCESS_NUM;
 
     VMX_DBG_LOG(DBG_LEVEL_1, 
-                "vmx_dr_access : eip=%lx, reg=%d, exit_qualification = %lx\n",
+                "vmx_dr_access : eip=%lx, reg=%d, exit_qualification = %lx",
                 eip, reg, exit_qualification);
 
     switch(exit_qualification & DEBUG_REG_ACCESS_REG) {
@@ -270,7 +270,7 @@ static void vmx_vmexit_do_invlpg(unsigned long va)
 
     __vmread(GUEST_EIP, &eip);
 
-    VMX_DBG_LOG(DBG_LEVEL_VMMU, "vmx_vmexit_do_invlpg:eip=%p, va=%p\n",
+    VMX_DBG_LOG(DBG_LEVEL_VMMU, "vmx_vmexit_do_invlpg:eip=%p, va=%p",
             eip, va);
 
     /*
@@ -303,7 +303,7 @@ static void vmx_io_instruction(struct xen_regs *regs,
     __vmread(GUEST_EIP, &eip);
 
     VMX_DBG_LOG(DBG_LEVEL_1, 
-            "vmx_io_instruction: eip=%p, exit_qualification = %lx\n",
+            "vmx_io_instruction: eip=%p, exit_qualification = %lx",
             eip, exit_qualification);
 
     if (test_bit(6, &exit_qualification))
@@ -318,7 +318,7 @@ static void vmx_io_instruction(struct xen_regs *regs,
 
     vio = (vcpu_iodata_t *) d->arch.arch_vmx.vmx_platform.shared_page_va;
     if (vio == 0) {
-        VMX_DBG_LOG(DBG_LEVEL_1, "bad shared page: %lx\n", (unsigned long) vio);
+        VMX_DBG_LOG(DBG_LEVEL_1, "bad shared page: %lx", (unsigned long) vio);
         domain_crash(); 
     }
     p = &vio->vp_ioreq;
@@ -400,8 +400,8 @@ static void mov_to_cr(int gp, int cr, struct xen_regs *regs)
         __vmx_bug(regs);
     }
     
-    VMX_DBG_LOG(DBG_LEVEL_1, "mov_to_cr: CR%d, value = %lx, \n", cr, value);
-    VMX_DBG_LOG(DBG_LEVEL_1, "current = %lx, \n", (unsigned long) current);
+    VMX_DBG_LOG(DBG_LEVEL_1, "mov_to_cr: CR%d, value = %lx,", cr, value);
+    VMX_DBG_LOG(DBG_LEVEL_1, "current = %lx,", (unsigned long) current);
 
     switch(cr) {
     case 0: 
@@ -427,7 +427,7 @@ static void mov_to_cr(int gp, int cr, struct xen_regs *regs)
             if (!(pfn = phys_to_machine_mapping(
                       d->arch.arch_vmx.cpu_cr3 >> PAGE_SHIFT))) 
             {
-                VMX_DBG_LOG(DBG_LEVEL_VMMU, "Invalid CR3 value = %lx\n", 
+                VMX_DBG_LOG(DBG_LEVEL_VMMU, "Invalid CR3 value = %lx", 
                         d->arch.arch_vmx.cpu_cr3);
                 domain_crash(); /* need to take a clean path */
             }
@@ -447,14 +447,14 @@ static void mov_to_cr(int gp, int cr, struct xen_regs *regs)
             d->arch.guest_table = mk_pagetable(pfn << PAGE_SHIFT);
             update_pagetables(d);
 
-            VMX_DBG_LOG(DBG_LEVEL_VMMU, "New arch.guest_table = %lx\n", 
+            VMX_DBG_LOG(DBG_LEVEL_VMMU, "New arch.guest_table = %lx", 
                     (unsigned long) (pfn << PAGE_SHIFT));
 
             __vmwrite(GUEST_CR3, pagetable_val(d->arch.shadow_table));
             /* 
              * arch->shadow_table should hold the next CR3 for shadow
              */
-            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx, pfn = %lx\n", 
+            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx, pfn = %lx", 
                     d->arch.arch_vmx.cpu_cr3, pfn);
             /* undo the get_page done in the para virt case */
             put_page_and_type(&frame_table[old_base_pfn]);
@@ -494,11 +494,11 @@ static void mov_to_cr(int gp, int cr, struct xen_regs *regs)
              * If different, make a shadow. Check if the PDBR is valid
              * first.
              */
-            VMX_DBG_LOG(DBG_LEVEL_VMMU, "CR3 value = %lx\n", value);
+            VMX_DBG_LOG(DBG_LEVEL_VMMU, "CR3 value = %lx", value);
             if ((value >> PAGE_SHIFT) > d->domain->max_pages)
             {
                 VMX_DBG_LOG(DBG_LEVEL_VMMU, 
-                        "Invalid CR3 value=%lx\n", value);
+                        "Invalid CR3 value=%lx", value);
                 domain_crash(); /* need to take a clean path */
             }
             pfn = phys_to_machine_mapping(value >> PAGE_SHIFT);
@@ -509,7 +509,7 @@ static void mov_to_cr(int gp, int cr, struct xen_regs *regs)
              * arch.shadow_table should now hold the next CR3 for shadow
              */
             d->arch.arch_vmx.cpu_cr3 = value;
-            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx\n", 
+            VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx",
                     value);
             __vmwrite(GUEST_CR3, pagetable_val(d->arch.shadow_table));
         }
@@ -576,7 +576,7 @@ static void mov_from_cr(int cr, int gp, struct xen_regs *regs)
         __vmx_bug(regs);
     }
 
-    VMX_DBG_LOG(DBG_LEVEL_VMMU, "mov_from_cr: CR%d, value = %lx, \n", cr, value);
+    VMX_DBG_LOG(DBG_LEVEL_VMMU, "mov_from_cr: CR%d, value = %lx,", cr, value);
 }
 
 static void vmx_cr_access (unsigned long exit_qualification, struct xen_regs *regs)
@@ -631,7 +631,7 @@ static inline void vmx_vmexit_do_hlt()
     unsigned long eip;
     __vmread(GUEST_EIP, &eip);
 #endif
-    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_hlt:eip=%p\n", eip);
+    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_hlt:eip=%p", eip);
     __enter_scheduler();
 }
 
@@ -641,7 +641,7 @@ static inline void vmx_vmexit_do_mwait()
     unsigned long eip;
     __vmread(GUEST_EIP, &eip);
 #endif
-    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_mwait:eip=%p\n", eip);
+    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_mwait:eip=%p", eip);
     __enter_scheduler();
 }
 
@@ -733,7 +733,7 @@ asmlinkage void vmx_vmexit_handler(struct xen_regs regs)
             __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
             printk("#PG error code: %lx\n", error_code);
         }
-        VMX_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x\n", 
+        VMX_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x",
                 idtv_info_field);
     }
 
@@ -741,7 +741,7 @@ asmlinkage void vmx_vmexit_handler(struct xen_regs regs)
     if (exit_reason != EXIT_REASON_EXTERNAL_INTERRUPT &&
         exit_reason != EXIT_REASON_VMCALL &&
         exit_reason != EXIT_REASON_IO_INSTRUCTION)
-        VMX_DBG_LOG(DBG_LEVEL_0, "exit reason = %x\n", exit_reason);
+        VMX_DBG_LOG(DBG_LEVEL_0, "exit reason = %x", exit_reason);
 
     if (exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) {
         domain_crash();         
@@ -799,7 +799,7 @@ asmlinkage void vmx_vmexit_handler(struct xen_regs regs)
             __vmread(EXIT_QUALIFICATION, &va);
             __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
             VMX_DBG_LOG(DBG_LEVEL_VMMU, 
-                    "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx\n",
+                    "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
                         regs.eax, regs.ebx, regs.ecx, regs.edx, regs.esi,
                         regs.edi);
             ed->arch.arch_vmx.vmx_platform.mpci.inst_decoder_regs = &regs;
@@ -893,7 +893,7 @@ asmlinkage void vmx_vmexit_handler(struct xen_regs regs)
         __get_instruction_length(inst_len);
         __vmread(EXIT_QUALIFICATION, &exit_qualification);
 
-        VMX_DBG_LOG(DBG_LEVEL_1, "eip = %lx, inst_len =%lx, exit_qualification = %lx\n", 
+        VMX_DBG_LOG(DBG_LEVEL_1, "eip = %lx, inst_len =%lx, exit_qualification = %lx", 
                 eip, inst_len, exit_qualification);
         vmx_cr_access(exit_qualification, &regs);
         __update_guest_eip(inst_len);
index 54cefbe92ced1effc563b00e367d23e7fd01449d..8427ffb1a38f6efd290d4a3dc1374f11f608865f 100644 (file)
@@ -69,7 +69,7 @@ static void pit_cal_count(struct vmx_virpit_t *vpit)
 {
     unsigned int usec_delta = (unsigned int)((NOW() - vpit->inject_point) / 1000);
     if (usec_delta > vpit->period * 1000)
-        VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT:long time has passed from last injection!\n");
+        VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT:long time has passed from last injection!");
     vpit->count = vpit->init_val - ((usec_delta * PIT_FREQ / 1000000) % vpit->init_val );
 }
 
index e7f80bed455b6bec81444b62f6e53b2648ce0441..b7939d1a877c352f5d6726138b0f135733fbfec8 100644 (file)
@@ -194,7 +194,7 @@ void vmx_io_assist(struct exec_domain *ed)
     vio = (vcpu_iodata_t *) ed->arch.arch_vmx.vmx_platform.shared_page_va;
     if (vio == 0) {
         VMX_DBG_LOG(DBG_LEVEL_1, 
-                    "bad shared page: %lx\n", (unsigned long) vio);
+                    "bad shared page: %lx", (unsigned long) vio);
         domain_crash();
     }
     p = &vio->vp_ioreq;
@@ -313,7 +313,7 @@ static inline int find_highest_pending_irq(struct exec_domain *d)
     vio = (vcpu_iodata_t *) d->arch.arch_vmx.vmx_platform.shared_page_va;
     if (vio == 0) {
         VMX_DBG_LOG(DBG_LEVEL_1, 
-                    "bad shared page: %lx\n", (unsigned long) vio);
+                    "bad shared page: %lx", (unsigned long) vio);
         domain_crash();
     }
         
@@ -327,7 +327,7 @@ static inline void clear_highest_bit(struct exec_domain *d, int vector)
     vio = (vcpu_iodata_t *) d->arch.arch_vmx.vmx_platform.shared_page_va;
     if (vio == 0) {
         VMX_DBG_LOG(DBG_LEVEL_1, 
-                    "bad shared page: %lx\n", (unsigned long) vio);
+                    "bad shared page: %lx", (unsigned long) vio);
         domain_crash();
     }
         
@@ -350,14 +350,14 @@ void vmx_intr_assist(struct exec_domain *d)
 
     __vmread(VM_ENTRY_INTR_INFO_FIELD, &intr_fields);
     if (intr_fields & INTR_INFO_VALID_MASK) {
-        VMX_DBG_LOG(DBG_LEVEL_1, "vmx_intr_assist: intr_fields: %lx\n", 
+        VMX_DBG_LOG(DBG_LEVEL_1, "vmx_intr_assist: intr_fields: %lx",
                     intr_fields);
         return;
     }
 
     __vmread(GUEST_EFLAGS, &eflags);
     if (irq_masked(eflags)) {
-        VMX_DBG_LOG(DBG_LEVEL_1, "guesting pending: %x, eflags: %lx\n", 
+        VMX_DBG_LOG(DBG_LEVEL_1, "guesting pending: %x, eflags: %lx",
                     highest_vector, eflags);
         return;
     }
index c4f7daec44fbec2f6298902b45d782d0a26a72d0..b35824f0740e0ccbe52496351106067f770e4a49 100644 (file)
@@ -113,7 +113,7 @@ int vmx_setup_platform(struct exec_domain *d, execution_context_t *context)
 
     n = context->ecx;
     if (n > 32) {
-        VMX_DBG_LOG(DBG_LEVEL_1, "Too many e820 entries: %d\n", n);
+        VMX_DBG_LOG(DBG_LEVEL_1, "Too many e820 entries: %d", n);
         return -1;
     }